{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "cheap-consequence",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2021-03-01 10:22:35,366 [open_context_base.py] _socket_reconnect_and_wait_ready:255: Start connecting: host=127.0.0.1; port=11111;\n",
      "2021-03-01 10:22:35,370 [open_context_base.py] on_connected:344: Connected : conn_id=1; \n",
      "2021-03-01 10:22:35,374 [open_context_base.py] _handle_init_connect:445: InitConnect ok: conn_id=1; info={'server_version': 500, 'login_user_id': 716900, 'conn_id': 6771977928304736457, 'conn_key': 'B6867207D892BC90', 'conn_iv': '95FB6A964D52F6B1', 'keep_alive_interval': 10, 'is_encrypt': False};\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '', 'svr_recv_time_ask': '', 'Bid': [(689.5, 10500, 21, {}), (689.0, 29000, 37, {}), (688.5, 23700, 18, {}), (688.0, 23800, 54, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 1400, 9, {}), (690.5, 15000, 37, {}), (691.0, 28800, 53, {}), (691.5, 31000, 46, {}), (692.0, 150100, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2400, 10, {}), (694.0, 22500, 34, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:35.925', 'svr_recv_time_ask': '2021-03-01 10:22:35.925', 'Bid': [(689.5, 10500, 21, {}), (689.0, 29000, 37, {}), (688.5, 23700, 18, {}), (688.0, 23800, 54, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 1000, 7, {}), (690.5, 15000, 37, {}), (691.0, 28800, 53, {}), (691.5, 31000, 46, {}), (692.0, 150100, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2400, 10, {}), (694.0, 22500, 34, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:35.955', 'svr_recv_time_ask': '2021-03-01 10:22:35.955', 'Bid': [(689.5, 10300, 21, {}), (689.0, 29000, 37, {}), (688.5, 23700, 18, {}), (688.0, 23800, 54, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 700, 5, {}), (690.5, 15000, 37, {}), (691.0, 28800, 53, {}), (691.5, 31000, 46, {}), (692.0, 150100, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2400, 10, {}), (694.0, 22500, 34, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:36.565', 'svr_recv_time_ask': '2021-03-01 10:22:36.565', 'Bid': [(689.5, 10100, 20, {}), (689.0, 29000, 37, {}), (688.5, 23700, 18, {}), (688.0, 23800, 54, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 700, 5, {}), (690.5, 15000, 37, {}), (691.0, 28800, 53, {}), (691.5, 31000, 46, {}), (692.0, 150100, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2400, 10, {}), (694.0, 22500, 34, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:36.705', 'svr_recv_time_ask': '2021-03-01 10:22:36.705', 'Bid': [(689.5, 10100, 20, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23800, 54, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 700, 5, {}), (690.5, 15000, 37, {}), (691.0, 28800, 53, {}), (691.5, 31000, 46, {}), (692.0, 150100, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2400, 10, {}), (694.0, 22500, 34, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:36.825', 'svr_recv_time_ask': '2021-03-01 10:22:36.825', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23800, 54, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 21900, 7, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150100, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2400, 10, {}), (694.0, 22500, 34, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:37.135', 'svr_recv_time_ask': '2021-03-01 10:22:37.135', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 25300, 55, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 21900, 7, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150100, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2400, 10, {}), (694.0, 22500, 34, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:37.195', 'svr_recv_time_ask': '2021-03-01 10:22:37.195', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 25300, 55, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 21900, 7, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150100, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:37.325', 'svr_recv_time_ask': '2021-03-01 10:22:37.325', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 25300, 55, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 21900, 7, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:37.465', 'svr_recv_time_ask': '2021-03-01 10:22:37.465', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 25300, 55, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 22000, 8, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:37.555', 'svr_recv_time_ask': '2021-03-01 10:22:37.555', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23800, 54, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 21700, 6, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:37.575', 'svr_recv_time_ask': '2021-03-01 10:22:37.575', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23800, 54, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23600, 7, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:37.885', 'svr_recv_time_ask': '2021-03-01 10:22:37.885', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25800, 55, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 25400, 8, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:37.945', 'svr_recv_time_ask': '2021-03-01 10:22:37.945', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 25400, 8, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:38.275', 'svr_recv_time_ask': '2021-03-01 10:22:38.275', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23600, 7, {}), (690.5, 17000, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:38.846', 'svr_recv_time_ask': '2021-03-01 10:22:38.846', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 25400, 8, {}), (690.5, 19000, 39, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:39.125', 'svr_recv_time_ask': '2021-03-01 10:22:39.125', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23600, 7, {}), (690.5, 19000, 39, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22600, 35, {}), (694.5, 31600, 16, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:39.255', 'svr_recv_time_ask': '2021-03-01 10:22:39.255', 'Bid': [(689.5, 9000, 19, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23600, 7, {}), (690.5, 19000, 39, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:39.405', 'svr_recv_time_ask': '2021-03-01 10:22:39.405', 'Bid': [(689.5, 9200, 20, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23300, 5, {}), (690.5, 19000, 39, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:39.575', 'svr_recv_time_ask': '2021-03-01 10:22:39.575', 'Bid': [(689.5, 9200, 20, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 22800, 4, {}), (690.5, 19000, 39, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:39.665', 'svr_recv_time_ask': '2021-03-01 10:22:39.665', 'Bid': [(689.5, 9200, 20, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 24600, 5, {}), (690.5, 19000, 39, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:39.705', 'svr_recv_time_ask': '2021-03-01 10:22:39.705', 'Bid': [(689.5, 9200, 20, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 24700, 6, {}), (690.5, 18900, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:39.775', 'svr_recv_time_ask': '2021-03-01 10:22:39.775', 'Bid': [(689.5, 9100, 20, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 24700, 6, {}), (690.5, 18900, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:39.875', 'svr_recv_time_ask': '2021-03-01 10:22:39.875', 'Bid': [(689.5, 9100, 20, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 24700, 7, {}), (690.5, 18900, 38, {}), (691.0, 26800, 52, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 32200, 18, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:40.025', 'svr_recv_time_ask': '2021-03-01 10:22:40.025', 'Bid': [(689.5, 8100, 18, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 22900, 6, {}), (690.5, 18900, 38, {}), (691.0, 26400, 51, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 32200, 18, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:40.155', 'svr_recv_time_ask': '2021-03-01 10:22:40.155', 'Bid': [(689.5, 8100, 18, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 22900, 6, {}), (690.5, 18900, 38, {}), (691.0, 26400, 51, {}), (691.5, 31000, 46, {}), (692.0, 150400, 240, {}), (692.5, 16200, 28, {}), (693.0, 36900, 63, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:40.405', 'svr_recv_time_ask': '2021-03-01 10:22:40.405', 'Bid': [(689.5, 8100, 18, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 22900, 6, {}), (690.5, 18900, 38, {}), (691.0, 26400, 51, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16200, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:40.415', 'svr_recv_time_ask': '2021-03-01 10:22:40.415', 'Bid': [(689.5, 8600, 19, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 22900, 6, {}), (690.5, 18900, 38, {}), (691.0, 26400, 51, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16200, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:40.535', 'svr_recv_time_ask': '2021-03-01 10:22:40.535', 'Bid': [(689.5, 8600, 19, {}), (689.0, 29000, 37, {}), (688.5, 22000, 18, {}), (688.0, 25900, 56, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 22900, 6, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16200, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:41.306', 'svr_recv_time_ask': '2021-03-01 10:22:41.306', 'Bid': [(689.5, 8700, 20, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23900, 55, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 22900, 6, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16200, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:41.395', 'svr_recv_time_ask': '2021-03-01 10:22:41.395', 'Bid': [(689.5, 8700, 20, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23900, 55, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23400, 7, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16200, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:41.415', 'svr_recv_time_ask': '2021-03-01 10:22:41.415', 'Bid': [(689.5, 8700, 20, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23900, 55, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23400, 7, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16400, 29, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:41.455', 'svr_recv_time_ask': '2021-03-01 10:22:41.455', 'Bid': [(689.5, 8700, 20, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23900, 55, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23500, 8, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16400, 29, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:41.545', 'svr_recv_time_ask': '2021-03-01 10:22:41.545', 'Bid': [(689.5, 9200, 21, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23900, 55, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23500, 8, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16400, 29, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:42.115', 'svr_recv_time_ask': '2021-03-01 10:22:42.115', 'Bid': [(689.5, 9000, 20, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 23900, 55, {}), (687.5, 10500, 9, {}), (687.0, 11600, 13, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23500, 8, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16400, 29, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:42.555', 'svr_recv_time_ask': '2021-03-01 10:22:42.555', 'Bid': [(689.5, 9000, 20, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23500, 8, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16400, 29, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:42.565', 'svr_recv_time_ask': '2021-03-01 10:22:42.565', 'Bid': [(689.5, 9100, 21, {}), (689.0, 29000, 37, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23500, 8, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16400, 29, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:43.195', 'svr_recv_time_ask': '2021-03-01 10:22:43.195', 'Bid': [(689.5, 9100, 21, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23500, 8, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150500, 241, {}), (692.5, 16400, 29, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:43.915', 'svr_recv_time_ask': '2021-03-01 10:22:43.915', 'Bid': [(689.5, 9100, 21, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23500, 8, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:43.995', 'svr_recv_time_ask': '2021-03-01 10:22:43.995', 'Bid': [(689.5, 8200, 19, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23500, 8, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:44.035', 'svr_recv_time_ask': '2021-03-01 10:22:44.035', 'Bid': [(689.5, 8200, 19, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23700, 9, {}), (690.5, 19500, 39, {}), (691.0, 25800, 50, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:44.055', 'svr_recv_time_ask': '2021-03-01 10:22:44.055', 'Bid': [(689.5, 8200, 19, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23700, 9, {}), (690.5, 19500, 39, {}), (691.0, 25900, 51, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:44.115', 'svr_recv_time_ask': '2021-03-01 10:22:44.115', 'Bid': [(689.5, 8300, 20, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23700, 9, {}), (690.5, 19500, 39, {}), (691.0, 25900, 51, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:44.165', 'svr_recv_time_ask': '2021-03-01 10:22:44.165', 'Bid': [(689.5, 8500, 21, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23700, 9, {}), (690.5, 19500, 39, {}), (691.0, 25900, 51, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:44.275', 'svr_recv_time_ask': '2021-03-01 10:22:44.275', 'Bid': [(689.5, 8200, 21, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10800, 9, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23700, 9, {}), (690.5, 19500, 39, {}), (691.0, 25900, 51, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:44.295', 'svr_recv_time_ask': '2021-03-01 10:22:44.295', 'Bid': [(689.5, 8200, 21, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10900, 10, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23700, 9, {}), (690.5, 19500, 39, {}), (691.0, 25900, 51, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n",
      "OrderBookTest  {'code': 'HK.00700', 'svr_recv_time_bid': '2021-03-01 10:22:44.405', 'svr_recv_time_ask': '2021-03-01 10:22:44.405', 'Bid': [(689.5, 8200, 21, {}), (689.0, 29100, 38, {}), (688.5, 24000, 19, {}), (688.0, 25400, 56, {}), (687.5, 10500, 9, {}), (687.0, 10100, 12, {}), (686.5, 12300, 10, {}), (686.0, 14800, 24, {}), (685.5, 10900, 10, {}), (685.0, 18000, 50, {})], 'Ask': [(690.0, 23800, 10, {}), (690.5, 19500, 39, {}), (691.0, 25900, 51, {}), (691.5, 31000, 46, {}), (692.0, 150600, 242, {}), (692.5, 16300, 28, {}), (693.0, 36800, 62, {}), (693.5, 2300, 9, {}), (694.0, 22500, 34, {}), (694.5, 31700, 17, {})]}\n"
     ]
    }
   ],
   "source": [
    "import time\n",
    "from futu import *\n",
    "class OrderBookTest(OrderBookHandlerBase):\n",
    "    def on_recv_rsp(self, rsp_pb):\n",
    "        ret_code, data = super(OrderBookTest,self).on_recv_rsp(rsp_pb)\n",
    "        if ret_code != RET_OK:\n",
    "            print(\"OrderBookTest: error, msg: %s\" % data)\n",
    "            return RET_ERROR, data\n",
    "        print(\"OrderBookTest \", data) # OrderBookTest自己的处理逻辑\n",
    "        return RET_OK, data\n",
    "quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)\n",
    "handler = OrderBookTest()\n",
    "quote_ctx.set_handler(handler)  # 设置实时摆盘回调\n",
    "quote_ctx.subscribe(['HK.00700'], [SubType.ORDER_BOOK])  # 订阅买卖摆盘类型，FutuOpenD开始持续收到服务器的推送\n",
    "time.sleep(15)  #  设置脚本接收FutuOpenD的推送持续时间为15秒\n",
    "quote_ctx.close()  # 关闭当条连接，FutuOpenD会在1分钟后自动取消相应股票相应类型的订阅"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "behavioral-newcastle",
   "metadata": {},
   "outputs": [],
   "source": [
    "from futu import *\n",
    "import time\n",
    "quote_ctx = OpenQuoteContext(host='127.0.0.1', port=11111)\n",
    "\n",
    "print('current subscription status :', quote_ctx.query_subscription())  # 查询初始订阅状态\n",
    "ret_sub, err_message = quote_ctx.subscribe(['HK.00700'], [SubType.QUOTE, SubType.TICKER], subscribe_push=False)\n",
    "# 先订阅了QUOTE和TICKER两个类型。订阅成功后FutuOpenD将持续收到服务器的推送，False代表暂时不需要推送给脚本\n",
    "if ret_sub == RET_OK:   # 订阅成功\n",
    "    print('subscribe successfully！current subscription status :', quote_ctx.query_subscription())  # 订阅成功后查询订阅状态\n",
    "    time.sleep(60)  # 订阅之后至少1分钟才能取消订阅\n",
    "    ret_unsub, err_message_unsub = quote_ctx.unsubscribe(['HK.00700'], [SubType.QUOTE])\n",
    "    if ret_unsub == RET_OK:\n",
    "        print('unsubscribe all successfully！current subscription status:', quote_ctx.query_subscription())  # 取消订阅后查询订阅状态\n",
    "    else:\n",
    "        print('Failed to cancel all subscriptions！', err_message_unsub)\n",
    "else:\n",
    "    print('subscription failed', err_message)\n",
    "quote_ctx.close() # 结束后记得关闭当条连接，防止连接条数用尽"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
